home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16927 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  971 b 

  1. Path: pop.gnn.com!dz1
  2. From: dz1@gnn.com (Dmitry Zaslavsky)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Callback Functions In C++
  5. Date: Fri, 12 Apr 1996 15:47:33
  6. Organization: GNN
  7. Message-ID: <4kmbo3$8mg@news-e2b.gnn.com>
  8. References: <4kdrfu$kiu@morse.ukonline.co.uk>
  9. NNTP-Posting-Host: www-28-136.gnn.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset="us-ascii"
  12. X-GNN-NewsServer-Posting-Date: 12 Apr 1996 19:42:59 GMT
  13. X-Mailer: GNNmessenger 1.2
  14.  
  15. Andy Walsh writes:
  16. >Can anyone tell me how I could code a callback function that works
  17. >inside a class and that I can pass the address of to the waveInOpen
  18. >function.  It would seem that a member function carries an extra
  19. >'this' pointer and so cannot be addressed the same as an ordinary
  20. >function.  
  21.  
  22. I don't know whether it'll solve your particular problem, but if you declare 
  23. your member function as static, it won't carry that "extra 'this' pointer"
  24. and will look just like ordinary function to the caller.
  25.  
  26. Dmitry.
  27.  
  28.  
  29.